package market

import (
	"context"
	"git.900sui.cn/kc/rpcinterface/client"
	cards2 "git.900sui.cn/kc/rpcinterface/interface/cards"
	"git.900sui.cn/kc/rpcinterface/interface/elastic/cards"
	"git.900sui.cn/kc/rpcinterface/interface/market"
	"git.900sui.cn/kc/rpcinterface/interface/order"
)

type Experience struct {
	client.Baseclient
}

func (e *Experience) Init() *Experience {
	e.ServiceName = "rpc_market"
	e.ServicePath = "Experience"
	return e
}

//总店新建体验
func (e *Experience) AddExperience(ctx context.Context, args *market.ArgsExperience, reply *bool) error {
	return e.Call(ctx, "AddExperience", args, reply)
}

//总店编辑体验
func (e *Experience) EditExperience(ctx context.Context, args *market.ArgsExperience, reply *bool) error {
	return e.Call(ctx, "EditExperience", args, reply)
}

//查询一条体验
func (e *Experience) GetOneExperience(ctx context.Context, args *market.ArgsGetOneExperience, reply *market.ReplyGetOneExperience) error {
	return e.Call(ctx, "GetOneExperience", args, reply)
}

//总店或者门店查询体验列表
func (e *Experience) GetExperience(ctx context.Context, args *market.ArgsGetExperience, reply *market.ReplyGetExperience) error {
	return e.Call(ctx, "GetExperience", args, reply)
}

//过滤没有活动的门店
func (e *Experience) FilterShopsHaveActivity(ctx context.Context, args *cards.ArgsSetShopsActivity, reply *[]int) error {
	return e.Call(ctx, "FilterShopsHaveActivity", args, reply)
}

//获取体验列表-rpc
func (e *Experience) GetExperienceActivity(ctx context.Context, args *market.ArgsGetExperienceActivity, reply *map[int][]cards2.ExperienceList) error {
	return e.Call(ctx, "GetExperienceActivity", args, reply)
}

//查看一条体验详情
func (e *Experience) GetExperienceDetail(ctx context.Context, args *market.ArgsGetOneExperienceSingleDetail, reply *market.ReplyGetExperienceDetail) error {
	return e.Call(ctx, "GetExperienceDetail", args, reply)
}

//总店结束体验状态
func (e *Experience) OverExperience(ctx context.Context, args *market.ArgsEditExperienceStatus, reply *bool) error {
	return e.Call(ctx, "OverExperience", args, reply)
}

//总店删除一条体验
func (e *Experience) DelExperience(ctx context.Context, args *market.ArgsEditExperienceStatus, reply *bool) error {
	return e.Call(ctx, "DelExperience", args, reply)
}

//查询体验适用门店
func (e *Experience) GetExperienceApplyShop(ctx context.Context, args *market.ArgsGetExperienceApplyShop, reply *[]order.ReplyCableShopInfo) error {
	return e.Call(ctx, "GetExperienceApplyShop", args, reply)
}

//校验体验参数
func (e *Experience) CheckExperience(ctx context.Context, args *market.ArgsCheckExperience, reply *market.ReplyCheckExperience) error {
	return e.Call(ctx, "CheckExperience", args, reply)
}

//创建用户体验单
func (e *Experience) AddUserExperience(ctx context.Context, args int, reply *int) error {
	return e.Call(ctx, "AddUserExperience", args, reply)
}

//用户消费体验单
func (e *Experience) ConsumerExperience(ctx context.Context, args *market.ArgsConsumerExperience, reply *bool) error {
	return e.Call(ctx, "ConsumerExperience", args, reply)
}

//查询用户体验单
func (e *Experience) GetUserExperience(ctx context.Context, args *market.ArgsGetUserExperience, reply *market.ReplyGetUserExperience) error {
	return e.Call(ctx, "GetUserExperience", args, reply)
}

//定时任务 - 每天0点更新
func (e *Experience) AutoUpdateStatus(ctx context.Context, args *bool, reply *bool) error {
	return e.Call(ctx, "AutoUpdateStatus", args, reply)
}

//冻结释放库存-rpc
func (e *Experience) FrozenStock(ctx context.Context, args *market.ArgsFrozenStock, reply *bool) error {
	return e.Call(ctx, "FrozenStock", args, reply)
}

//获取用户体验单项目信息
func (e *Experience) GetUserExperienceInfo(ctx context.Context, args *market.ArgsGetUserExperienceInfo, reply *[]order.ExperienceList) error {
	return e.Call(ctx, "GetUserExperienceInfo", args, reply)
}

//app根据门店id获取所有体验
func (e *Experience) GetShopExperienceInfo(ctx context.Context, args *market.ArgsGetShopExperienceInfo, reply *market.ReplyGetShopExperienceInfo) error {
	return e.Call(ctx, "GetShopExperienceInfo", args, reply)
}

//用户消费体验校验
func (e *Experience) ConsumerCheckout(ctx context.Context, args *market.ArgsConsumerCheckout, reply *bool) error {
	return e.Call(ctx, "ConsumerCheckout", args, reply)
}

//删除单项目时检查体验是否占用
func (e *Experience) DelExperienceCheck(ctx context.Context, args *[]int, reply *bool) error {
	return e.Call(ctx, "DelExperienceCheck", args, reply)
}